/*
 * 文件名：CompanyDaoImpl.java
 * 版权：Copyright 2007-2016 517na Tech. Co. Ltd. All Rights Reserved. 
 * 描述： CompanyDaoImpl.java
 * 修改人：yanshu
 * 修改时间：2016年1月11日
 * 修改内容：新增
 */
package com.feichuang.chineseWoodCarving.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.feichuang.chineseWoodCarving.dao.ICompanyDao;
import com.feichuang.chineseWoodCarving.interceptor.BeanUtils;
import com.feichuang.chineseWoodCarving.model.MCompanyVo;
import com.feichuang.chineseWoodCarving.model.MPagerRequestVo;

/**
 * TODO 添加类的一句话简单描述.
 * <p>
 * TODO 详细描述
 * <p>
 * TODO 示例代码
 * 
 * <pre>
 * </pre>
 * 
 * @author yanshu
 */
@Component("companyDao")
public class CompanyDaoImpl extends BaseDaoImpl implements ICompanyDao {

    /**
     * {@inheritDoc}.
     */
    @Override
    public boolean insertMCompanyInfo(MCompanyVo companyVo) {
        // TODO Auto-generated method stub
        BeanUtils.notNull(companyVo);
        this.sqlSession.insert("com.feichuang.chineseWoodCarving.dao.ICompanyDao.insertMCompanyInfo", companyVo);
        return true;
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public boolean updateMCompanyInfo(MCompanyVo companyVo) {
        // TODO Auto-generated method stub
        return false;
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public boolean deleteMCompanyInfo(MCompanyVo companyVo) {
        // TODO Auto-generated method stub
        this.sqlSession.update("com.feichuang.chineseWoodCarving.dao.ICompanyDao.deleteMCompanyInfo", companyVo);
        return true;
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public MCompanyVo selectMCompanyInfo(MCompanyVo companyVo) {
        // TODO Auto-generated method stub
        return this.sqlSession.selectOne("com.feichuang.chineseWoodCarving.dao.ICompanyDao.selectMCompanyInfo", companyVo);
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public List<MCompanyVo> selectBatchMCompanyInfo(MCompanyVo companyVo) {
        // TODO Auto-generated method stub
        return null;
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public List<MCompanyVo> selectMCompanyVoFuzzyQuer(MCompanyVo companyVo) {
        // TODO Auto-generated method stub
        return this.sqlSession.selectList("com.feichuang.chineseWoodCarving.dao.ICompanyDao.selectMCompanyVoFuzzyQuer", companyVo);
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public List<MCompanyVo> selectMCompanyInfoForPage(MPagerRequestVo<MCompanyVo> companyVo) {
        return this.sqlSession.selectList("com.feichuang.chineseWoodCarving.dao.ICompanyDao.selectMCompanyInfoForPage", companyVo);
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public int selectMCompanyInfoCountForPage(MCompanyVo companyVo) {
        return this.sqlSession.selectOne("com.feichuang.chineseWoodCarving.dao.ICompanyDao.selectMCompanyInfoCountForPage", companyVo);
    }

}
